import 'package:dmz/base/pageWidget/base_stateful_widget.dart';
import 'package:dmz/business/find/controller/find_main_controller.dart';
import 'package:dmz/business/find/widget/mian_widgets.dart';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:get/get.dart';

class FindPage extends BaseStatefulWidget<FindPageController> {
  const FindPage({super.key});

  @override
  bool showTitleBar() => false;

  @override
  Widget buildContent(BuildContext context) {
    return Column(children: [
      CarouselSliderWidget(imageUrls: controller.imageUrls),
      Obx(() => FindMainWidgets.titeWidget(
          controller.selectPage.value,
          (tag, {reload}) => controller.getPagedata(tag, 0,
              reload: controller.allDatas[tag].isNotEmpty, changePage: true))),
      FindMainWidgets.contentWidget(
          controller.pageController,
          controller.allDatas,
          (tag, {reload}) => controller.getPagedata(tag, 0),
          (tag, index) => controller.getPagedata(tag, index))
    ]);
  }
}
